Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: check for all zeros on startup #2880

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jeffwashington
Copy link

Problem

On startup, we can identify storages that have all zero lamport accounts. Perhaps the whole slot can be marked dead.

Summary of Changes

In generating index, we can find storages with all zeros and add them to clean.

Fixes #

// this whole slot can likely be marked dead and dropped. Clean has to determine that. There could be an older non-zero account for any of these zero lamport accounts.
self.dirty_stores.insert(slot, Arc::clone(storage));
self.accounts_index.add_uncleaned_roots([slot].into_iter());
self.shrink_candidate_slots.lock().unwrap().insert(slot);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know for sure we should do this. we may want to let clean calculate whether we can shrink or not. I suspect we don't want to add to shrink canddiate.

@jeffwashington
Copy link
Author

this pr seems to be 'correct', but it isn't sufficient until we have #2824 and part of #2865

@HaoranYi
Copy link

I restarted dev7

[2024-09-12T13:43:46.656559942Z INFO  agave_validator] Starting validator with: ArgsOs {
[2024-09-12T14:06:50.128786626Z INFO  solana_metrics::metrics] datapoint: clean_purge_slots_stats safety_checks_elapsed=190i remove_cache_elapsed=0i remove_storage_entries_elapsed=29822i drop_storage_entries_elapsed=168i num_cached_slots_removed=0i num_stored_slots_removed=16019i total_removed_storage_entries=16019i total_removed_cached_bytes=0i total_removed_stored_bytes=8390369512i scan_storages_elapsed=0i purge_accounts_index_elapsed=0i handle_reclaims_elapsed=0i

num_stored_slots_removed=16019i total_removed_storage_entries=16019i

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants